package day04;

public class extend03 {
    public static void main(String[] args) {
        int num=1;
        int sum=0;
        while(num<=100){
            sum+=num;
            num++;
        }
        System.out.println("1-100之间的和为"+sum);

        sum=0;
        for (int i=1;i<=100;i++){
            sum+=i;
        }
        System.out.println("1-100之间的和为"+sum);
    }
}
